//C11:ep11_5.c: struct vaviable as argument.
#include <stdio.h>
#include <string.h>
#define FORMAT "%d\n%s\n%f\n%f\n%f\n"

struct student_st
{
    int num;
    char name[20];
    float score[3];
};

void print(struct student_st);
int main(void)
{
    struct student_st stu;
    stu.num = 12345;
    strcpy(stu.name, "Li Lin");
    stu.score[0] = 67.5;
    stu.score[1] = 89;
    stu.score[2] = 78.6;
    print(stu);

    printf("\nhello\n");
}

void print(struct student_st stu)
{
    printf(FORMAT,stu.num,stu.name,stu.score[0],stu.score[1],stu.score[2]);
    printf("\n");
}